home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmAbout
- BackColor = &H8000000F&
- BorderStyle = 3 'Fixed Double
- Caption = "About"
- ClientHeight = 3720
- ClientLeft = 1395
- ClientTop = 1905
- ClientWidth = 5100
- ClipControls = 0 'False
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 4095
- HelpContextID = 8
- Icon = 0
- Left = 1350
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- MousePointer = 1 'Arrow
- ScaleHeight = 3720
- ScaleWidth = 5100
- Top = 1575
- Width = 5190
- Begin CommandButton cmdOK
- Cancel = -1 'True
- Caption = "&OK"
- Default = -1 'True
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 600
- TabIndex = 2
- Top = 3000
- Width = 1095
- End
- Begin Image imgIcon
- Height = 495
- Left = 960
- Top = 480
- Width = 495
- End
- Begin Label lblCopyright2
- Alignment = 2 'Center
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "lblCopyright2"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 270
- Left = 480
- TabIndex = 3
- Top = 1560
- Width = 1335
- End
- Begin Label lblCopyright1
- Alignment = 2 'Center
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "lblCopyright1"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 270
- Left = 510
- TabIndex = 1
- Top = 1080
- Width = 1335
- End
- Begin Label lblTitle
- Alignment = 2 'Center
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "lblTitle"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 270
- Left = 855
- TabIndex = 0
- Top = 120
- Width = 645
- End
- Begin Image imgCat
- Height = 3375
- Left = 2160
- Picture = VBDEABT.FRX:0000
- Top = 120
- Visible = 0 'False
- Width = 2640
- End
- '====================================================
- 'Sample VB program using UNLHA.DLL routine
- 'VBDeAbt.Frm (frmAbout)
- ' Original: Niiyama(HEROPA) SGV00153@niftyserve.or.jp
- ' English : Hitoshi Ozawa h_ozawa@bekkoame.or.jp
- '====================================================
- Option Explicit
- Dim mintDblClickCount As Integer
- Const CTL_SPACE = 16
- Sub cmdOK_Click ()
- Unload Me
- End Sub
- Sub Form_Load ()
- 'Set properties
- imgIcon.Picture = frmArchive.Icon
- Caption = "About " & APP_CAPTION
- lblTitle.Caption = APP_CAPTION & " " & APP_VERSION
- lblCopyright1.Caption = "Copyright(C) " & APP_DATE & " " & APP_COPYRIGHT & Chr$(13) & APP_COPYRIGHT2 & Chr$(13) & Chr$(13) & "Translated to English by " & APP_COPYRIGHT3 & Chr$(13) & APP_COPYRIGHT4 & Chr$(13) & APP_COPYRIGHT5
- lblCopyright2.Caption = "UNLHA.DLL Version " & Format$((UnlhaGetVersion() / 100), "Fixed") & Chr$(13) & "Copyright(C) 1995 Micco"
- Call SetControlPosition
- Call SetControl3D
- 'Set Help context ID
- Me.HelpContextID = HLP_DLGABOUT
- 'Display form at center of screen
- Call SetChildWindowPos(frmArchive, Me)
- Call DeleteSwitchTo(Me)
- End Sub
- Sub imgIcon_DblClick ()
- mintDblClickCount% = mintDblClickCount% + 1
- If mintDblClickCount% < 3 Then Exit Sub
- mintDblClickCount% = 3
- lblTitle.Visible = False
- lblCopyright1.Visible = False
- lblCopyright2.Visible = False
- imgIcon.Visible = False
- imgCat.Visible = True
- Me.Caption = "Me"
- End Sub
- 'Set button height depending on font size
- Sub SetButtonHeight (Ctl As Control)
- Dim saveFontName As String, saveFontSize As Single
- 'Save control parent FontName & FontSize
- saveFontName = Ctl.Parent.FontName
- saveFontSize = Ctl.Parent.FontSize
- Ctl.Parent.FontName = Ctl.FontName
- Ctl.Parent.FontSize = Ctl.FontSize
- Ctl.Height = Ctl.Parent.TextHeight(CStr(Ctl.Caption)) + 12 * Screen.TwipsPerPixelY
- 'Restore control parent FontName & FontSize
- Ctl.Parent.FontName = saveFontName
- Ctl.Parent.FontSize = saveFontSize
- End Sub
- Sub SetControl3D ()
- 'Draw 3D panel
- Me.AutoRedraw = True
- Call Draw3DForm(Me)
- Call Draw3DLine(Me, 20 * Screen.TwipsPerPixelX, (lblCopyright2.Top - CTL_SPACE% * Screen.TwipsPerPixelY) - 2 * Screen.TwipsPerPixelY, Me.ScaleWidth - 20 * Screen.TwipsPerPixelX, (lblCopyright2.Top - CTL_SPACE% * Screen.TwipsPerPixelY) - 2 * Screen.TwipsPerPixelY, 0)
- Me.AutoRedraw = False
- End Sub
- Sub SetControlPosition ()
- Dim intFormSysVSize As Integer
- Dim intFormSysHSize As Integer
- Dim intCtlMaxWidth As Integer
- mintDblClickCount% = 0 'initialization
- 'Set About.frm's system vertical size
- intFormSysVSize% = (GetSystemMetrics(SM_CYDLGFRAME) * 2 + GetSystemMetrics(SM_CYCAPTION)) * Screen.TwipsPerPixelY
- 'Set About.frm's system horizontal size
- intFormSysHSize% = (GetSystemMetrics(SM_CXDLGFRAME) * 2 + 2) * Screen.TwipsPerPixelX
- 'Set space to half icon size
- Call SetButtonHeight(cmdOK)
- 'Set to maximum width
- intCtlMaxWidth = lblTitle.Width
- If intCtlMaxWidth < lblCopyright1.Width Then intCtlMaxWidth = lblCopyright1.Width
- If intCtlMaxWidth < imgIcon.Width Then intCtlMaxWidth = imgIcon.Width
- If intCtlMaxWidth < lblCopyright2.Width Then intCtlMaxWidth = lblCopyright2.Width
- If intCtlMaxWidth < cmdOK.Width Then intCtlMaxWidth = cmdOK.Width
- intCtlMaxWidth = intCtlMaxWidth + CTL_SPACE% * 2 * Screen.TwipsPerPixelX
- 'Set height of each property
- lblTitle.Top = CTL_SPACE% * Screen.TwipsPerPixelY
- imgIcon.Top = CTL_SPACE% * Screen.TwipsPerPixelY \ 2 + lblTitle.Top + lblTitle.Height
- lblCopyright1.Top = CTL_SPACE% * Screen.TwipsPerPixelY \ 2 + imgIcon.Top + imgIcon.Height
- lblCopyright2.Top = CTL_SPACE% * Screen.TwipsPerPixelY * 2 + lblCopyright1.Top + lblCopyright1.Height
- cmdOK.Top = CTL_SPACE% * Screen.TwipsPerPixelY + lblCopyright2.Top + lblCopyright2.Height
- 'form height
- Me.Height = intFormSysVSize% + cmdOK.Top + cmdOK.Height + CTL_SPACE% * Screen.TwipsPerPixelY
- 'form width
- Me.Width = intFormSysHSize% + intCtlMaxWidth%
- imgCat.Left = Me.ScaleWidth / 2 - imgCat.Width / 2
- imgCat.Top = Me.ScaleHeight / 2 - imgCat.Height / 2
- 'Set each property to display at center of form
- lblTitle.Left = Me.ScaleWidth / 2 - lblTitle.Width / 2
- imgIcon.Left = Me.ScaleWidth / 2 - imgIcon.Width / 2
- lblCopyright1.Left = Me.ScaleWidth / 2 - lblCopyright1.Width / 2
- lblCopyright2.Left = Me.ScaleWidth / 2 - lblCopyright2.Width / 2
- cmdOK.Left = Me.ScaleWidth / 2 - cmdOK.Width / 2
- End Sub
-